#ifndef CONSOLE_H
#define CONSOLE_H

class Console; //kind-of a hardware layer, MUST NOT be used directly by anything else than Screen

#include "includes.h"

extern "C" {
#include <curses.h>
};

#include <list>
#include <string>
#include <cstdlib>
#include <iostream>
using namespace std;

#define COLOR_SELF COLOR_GREEN
#define COLOR_ALLY COLOR_YELLOW
#define COLOR_ENEMY COLOR_RED
#define COLOR_NEUTRAL COLOR_WHITE
#define BG_NORMAL COLOR_BLACK

#define PAIR_SELF 1
#define PAIR_ALLY 2
#define PAIR_ENEMY 3
#define PAIR_NEUTRAL 4


class Console {
	public:
		void print_char(char c, int x, int y, int color); //print a given character in color defined by a PAIR value (see definitions above)
		void print_string(string s, int x, int y, int color); //the same for a string
		void blit(); //redraw the console
		int get_key(); //returns a normal letter or a special character code (see /usr/include/curses.h, line (maybe) 1220)
		Console();
		~Console();
	protected:
		bool use_colors; //true if the terminal supports color output
};

#endif
